﻿CREATE TABLE [dbo].[Table] (
    [TableID]    INT           IDENTITY (1, 1) NOT NULL,
    [DatabaseID] INT           NOT NULL,
    [TableName]  VARCHAR (4000) NOT NULL,
    [Rows]       INT           NULL,
    [TotalSize]  DECIMAL (18)  NULL,
    [DataSize]   DECIMAL (18)  NULL,
    [IndexSize]  DECIMAL (18)  NULL,
    [Unused]     DECIMAL (18)  NULL,
    CONSTRAINT [PK_DatabaseTable] PRIMARY KEY CLUSTERED ([TableID] ASC),
    CONSTRAINT [FK_Tables_Database] FOREIGN KEY ([DatabaseID]) REFERENCES [dbo].[Database] ([DatabaseID])
);

